home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
v9n13.arc
/
WHATCPU.SCR
< prev
next >
Wrap
Text File
|
1990-06-14
|
1KB
|
50 lines
A 0100
JMP 0123
DB 0D,0A,"CPU is an 80$"
DB "86$"
DB "286$"
DB "386$"
DB "486$"
DB 0D,0A,"$"
MOV AH,09 ;Print opening message
MOV DX,0102
INT 21
MOV DX,0111 ;Test for 8088/8086
PUSH SP
POP AX
CMP SP,AX
JNZ 0166 ;Branch if test positive
MOV DX,0114 ;Test for 286
PUSHF
POP AX
OR AX,4000
PUSH AX
POPF
PUSHF
POP AX
TEST AX,4000
JZ 0166 ;Branch if test positive
MOV DX,0118 ;Separate 386s from 486s
DB 0F,20,C0 ;mov eax,cr0
DB 66,8B,D8 ;mov ebx,eax
DB 66,35,00,00,00,20 ;xor eax,20000000
DB 0F,22,C0 ;mov cr0,eax
DB 0F,20,C0 ;mov eax,cr0
DB 66,3B,C3 ;cmp eax,ebx
DB 0F,84,06,00 ;je 0166
DB BA,1C,01 ;mov dx,011C
DB 0F,22,C3 ;mov cr0,ebx
MOV AH,09 ;Print CPU type
INT 21
MOV AH,09 ;Terminate line and exit
MOV DX,0120
INT 21
RET
N WHATCPU.COM
RCX
72
W
Q